<!DOCTYPE HTML>
<html manifest="" lang="en-US">
<head>
    <meta charset="UTF-8">
    <title>prototype</title>
    <style type="text/css">
         /**
         * Example of an initial loading indicator.
         * It is recommended to keep this as minimal as possible to provide instant feedback
         * while other resources are still being loaded for the first time
         */
        html, body {
            height: 100%;
            background-color: #1985D0
        }

        #appLoadingIndicator {
            position: absolute;
            top: 50%;
            margin-top: -15px;
            text-align: center;
            width: 100%;
            height: 30px;
            -webkit-animation-name: appLoadingIndicator;
            -webkit-animation-duration: 0.5s;
            -webkit-animation-iteration-count: infinite;
            -webkit-animation-direction: linear;
        }

        #appLoadingIndicator > * {
            background-color: #FFFFFF;
            display: inline-block;
            height: 30px;
            -webkit-border-radius: 15px;
            margin: 0 5px;
            width: 30px;
            opacity: 0.8;
        }

        @-webkit-keyframes appLoadingIndicator{
            0% {
                opacity: 0.8
            }
            50% {
                opacity: 0
            }
            100% {
                opacity: 0.8
            }
        }
    </style>
    <!-- The line below must be kept intact for Sencha Command to build your application -->
    <script id="microloader" type="text/javascript" src="touch/microloader/development.js"></script>
	<!-- <script id="locale" type="text/javascript" src="localization/locale/touch-fr_FR.js"></script> -->
	<script>
	
	function lang() {
			
			//var myVar = self.location.toString();
			//alert(myVar);
			
			var queryString = window.location.search.substring(1);
			var vars = queryString.split("&");
			for(var i=0; i<vars.length; i++){
				var getValue = vars[i].split("=");
				if(getValue[0] == "lang") 
				{
					
						//return getValue[1]; 
					var docHeadObj = document.getElementsByTagName("head")[0];
					var dynamicScript = document.createElement("script");
					dynamicScript.id="locale";
					dynamicScript.type = "text/javascript";
					dynamicScript.src = "localization/locale/touch-"+getValue[1]+".js";
					docHeadObj.appendChild(dynamicScript);
				}
				else
				{
					var docHeadObj = document.getElementsByTagName("head")[0];
					var dynamicScript = document.createElement("script");
					dynamicScript.id="locale";
					dynamicScript.type = "text/javascript";
					dynamicScript.src = "localization/locale/touch-fr_FR.js";
					docHeadObj.appendChild(dynamicScript);
				}
			}
				
            
        }
	
	function LoadMyJs(scriptName) {
		var docHeadObj = document.getElementsByTagName("head")[0];
		var dynamicScript = document.createElement("script");
		dynamicScript.id="locale";
		dynamicScript.type = "text/javascript";
		dynamicScript.src = scriptName;
		docHeadObj.appendChild(dynamicScript);
		
		alert(scriptName);
	}
	</script>
</head>
<body onload="lang()">
    <div id="appLoadingIndicator">
        <div></div>
        <div></div>
        <div></div>
    </div>
</body>
</html>
